package com.ep.modules.app.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ep.common.utils.PageUtils;
import com.ep.modules.app.dao.AppContainerArea整理Mapper;
import com.ep.modules.app.entity.AppContainerArea整理;
import com.ep.modules.app.entity.AppContainerArea整理Example;
import com.ep.modules.app.service.AppContainerArea整理Service;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AppContainerArea整理ServiceImpl implements AppContainerArea整理Service {
    @Autowired
    private AppContainerArea整理Mapper appContainerArea整理Mapper;

    public PageUtils queryPage(Map<String, Object> params) {
        String searchKey = (String)params.get("searchKey");
        Long searchUserId = (Long)params.get("searchUserId");
        AppContainerArea整理Example example = new AppContainerArea整理Example();
        AppContainerArea整理Example.Criteria criteria = example.createCriteria();
        List<AppContainerArea整理> list = appContainerArea整理Mapper.selectByExample(example);
        Page<AppContainerArea整理> page = new Page<>();
        page.setRecords(list);
        return new PageUtils(page);
    }

    public AppContainerArea整理 getById(Long id) {
        return appContainerArea整理Mapper.selectByPrimaryKey(id.intValue());
    }

    public void save(AppContainerArea整理 entity) {
        appContainerArea整理Mapper.insert(entity);
    }

    public void update(AppContainerArea整理 entity) {
        appContainerArea整理Mapper.updateByPrimaryKeySelective(entity);
    }

    public void deleteBatch(Long[] ids) {
        for (Long id : ids) {
                appContainerArea整理Mapper.deleteByPrimaryKey(id.intValue());
        }
    }
}